cmake_minimum_required(VERSION 3.10)
project(ascend_multiply_custom LANGUAGES C CXX)

# C++ 标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 包含路径（正确的方式）
set(ASCEND_HOME /usr/local/Ascend/ascend-toolkit/latest)
include_directories(${ASCEND_HOME}/include)
link_directories(${ASCEND_HOME}/lib64)
# 源文件
set(SOURCES
    multiply_custom.cpp
    main.cpp
)

# 可执行文件
add_executable(multiply_custom_exe ${SOURCES})

# 链接 Ascend C 库
target_link_libraries(multiply_custom_exe
    cce
    acl
    tikicpulib
)

# 可选：安装规则
install(TARGETS multiply_custom_exe
        RUNTIME DESTINATION bin)
